package com.hxd.otc.module.order.presenter;

import android.graphics.Bitmap;

import com.hxd.otc.module.order.contract.AlipayQRContract;
import com.hxd.otc.mvp.base.BasePresenter;
import com.hxd.otc.utils.AddressUtil;

/**
 * 包  名 :  com.hxd.otc.module.order.presenter
 * 类  名 :  AlipayQRPresenter
 * 作  者 :  zjl
 * 时  间 :  2018/6/21 12:06
 * 描  述 :  ${TODO}
 */
public class AlipayQRPresenter extends BasePresenter<AlipayQRContract.View> implements AlipayQRContract.Presenter {


    public AlipayQRPresenter(AlipayQRContract.View view) {
        super(view);
    }

    @Override
    public void start() {

    }

    @Override
    public void savePicture(final Bitmap bitmap, final String fileName) {

        AddressUtil.saveAddress(bitmap, fileName, new AddressUtil.SaveAddressListener() {
            @Override
            public void fail(String str) {
                mView.onSaveFaild(str);
            }

            @Override
            public void success(String str) {
                mView.onSaveSucced();
            }
        });
    }
}
